home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / iconv8_l.arc / IDOL.ARC / UNIX.ICN < prev    next >
Encoding:
Text File  |  1990-03-19  |  1.5 KB  |  66 lines

  1. #
  2. # @(#)unix.icn    1.3 3/13/90
  3. # OS-specific code for UNIX Idol
  4. #
  5. global lnkopt,env,sysok
  6.  
  7. procedure mysystem(s)
  8.   if \loud then write(s)
  9.   return system(s)
  10. end
  11.  
  12. procedure filename(s)
  13.   s[9:0] := ""
  14.   return s
  15. end
  16. procedure writesublink(s)
  17.   writelink(env||"/"||s)
  18. end
  19. procedure envpath(filename)
  20.   return env||"/"||filename
  21. end
  22. #
  23. # Installation.
  24. # Uses hierarchical filesystem on some systems (see initialize)
  25. #
  26. procedure install(args)
  27.   write("Installing idol environment in ",env)
  28.   if env ~== "" then mysystem("mkdir "||env)
  29.   fout := envopen("i_object.icn","w")
  30.   write(fout,"record idol_object(__state,__methods)")
  31.   close(fout)
  32.   fout := &null
  33.   cdicont(["i_object"])
  34. end
  35.  
  36. procedure makeexe(args,i)
  37.   exe := args[i]
  38.   if icont(lnkopt||exe) = \sysok then {
  39.       mysystem("rm "||exe||".icn")
  40.       if \exec then {
  41.     write("Executing:")
  42.     every i := exec+1 to *args do exe ||:= " "||args[i]
  43.     mysystem(exe)
  44.       }
  45.   }
  46. end
  47. #
  48. # system-dependent compilation of idolfile.icn
  49. #   (in the idol subdirectory, if there is one)
  50. #
  51. procedure cdicont(idolfiles)
  52.   args := " -c"
  53.   rms  := ""
  54.   every ifile := !idolfiles do args ||:= " " || ifile
  55.   every ifile := !idolfiles do rms  ||:= " " || ifile || ".icn"
  56.  
  57.   if comp = -2 then return  # -t --> don't translate at all
  58.   if icont(args,"cd idolcode.env; ") = \sysok
  59.   then mysystem("cd idolcode.env; rm "||rms)
  60. end
  61. procedure sysinitialize()
  62.   lnkopt := " -Sr500 -SF30 -Si1000 "
  63.   env:= "idolcode.env"
  64.   sysok := 0
  65. end
  66.